package com.supply.dl.widget.adapter;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import com.supply.dl.activity.fragment.BaseFragment;

import java.util.List;

public class MyPageAdapter extends FragmentPagerAdapter
{
	private List<BaseFragment> mFragmentPair;

	public MyPageAdapter(FragmentManager fm, List<BaseFragment> mFragmentPair)
	{
		super(fm);
		this.mFragmentPair = mFragmentPair;
	}

	@Override public Fragment getItem(int position)
	{
		Fragment fragment = mFragmentPair.get(position);
		Bundle bundle = new Bundle();
		fragment.setArguments(bundle);
		return mFragmentPair.get(position);
	}

	@Override public int getCount()
	{
		return mFragmentPair.size();
	}
}


